<?php loadScriptDepends('wcss'); ?>

<div class="pure-g">
    <div class="pure-u-1 b-h50"></div>
    <div class="pure-u-1 b-h200">
        <form class="pure-form" id="subform">
            <textarea id="content" class="b-h150 b-wd1"></textarea>
            <button id="subbtn" class="pure-button pure-button-primary b-mt5 b-wd1 b-h40">生成</button>
        </form>
    </div>
    <div class="pure-u-1">
        <div class="b-h300 b-test-color33" id="rst"></div>
    </div> 
</div>
<script>
;(function($){
    var $form = $('#subform'),
        $btn = $('#subbtn'),
        $content = $('#content'),
        $rst = $('#rst');
    $btn.on('click', function(e){
        e.preventDefault();
        $.post('?do=qrcode', {content:$content.val()}, function(d){
            $rst.html('<img src="'+d.data.qrimg+'"/>')
        }, 'json')
        return false;
    })
})(Zepto);
</script>
